package view;


import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Scanner;

import checking.IdGenerator;
import checking.InputValidation;

import model.Activity;
import model.HumanResources;
import model.Project;
import model.Task;

import controller.Controller;

public class Menu {
	 /**
	 * @param args
	 * @throws ParseException 
	 */
	static InputValidation oValidation = new InputValidation();
	static HumanResources humRes=new HumanResources();
	static DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
	static IdGenerator idGenerator=new IdGenerator();
	static Controller controller=new Controller();
	static int sResp=0;
	static Project addedProject=null;
	static Activity addedActivity = null;
	static Task addedTask=null;
	static ArrayList<Project> pList=humRes.getProjectList();
	static Project updatedProject=null;
	
	static MenuHelperForProject oMenu = new  MenuHelperForProject();
	
	public static void main(String[] args) throws ParseException {		

		Scanner response = new Scanner(System.in);
		
		System.out.println("HUMAN RESUORCE SYSTEM DEVELOPMENT\n");
		System.out.println("      MENU             \n");
		System.out.println("1- Add    Project      \n");
		System.out.println("2- Remove Project      \n");
		System.out.println("3- Update Project      \n");
		System.out.println("4- Exit              \n\n");
		System.out.println("\n");
		
		
		
		String firstResp=response.next();
		int fResp= oValidation.checkInteger(firstResp);
		
		oValidation.validateResponse(fResp, 4);
		
		if(fResp==1)
			oMenu.addProjectFromMenu();
		if(fResp==2)
			oMenu.removeProjectFromMenu();
		if(fResp==3)
			oMenu.updateProjectFromMenu();
		
			
	}

}
		